export default {
	namespaced: true,
	state: {
		platform: '',
		networkType: '',
		windowHeight: 750,
		scrollHeight: 706
	},
	mutations: {
		updatePlatform(state, platform) {
			state.platform = platform;
		},
		updateNetworkType(state, networkType) {
			state.networkType = networkType;
		},
		updateHeight(state, payload) {
			state.windowHeight = payload.windowHeight;
			// windowHeight - statusBarHeight - c-section.height - c-section.margin
			state.scrollHeight = payload.windowHeight - payload.statusBarHeight - 38 - 6;
		}
	},
	getters: {
		systemInfo: (state) => {
			return {
				platform: state.platform,
				networkType: state.networkType,
				windowHeight: state.windowHeight,
				scrollHeight: state.scrollHeight
			}
		}
	}
}
